ruby:
  if user_signed_in_or_guest_mode?
    body_class = 'sidebar-mini'
  else
    body_class = 'layout-top-nav'
  end

doctype html
html lang="#{I18n.locale}"
  head
    title = page_title(yield :title)
    meta[charset="utf-8"]
    meta[name="viewport" content="width=device-width, initial-scale=1.0"]
    link[rel="apple-touch-icon" sizes="60x60" href="#{asset_path('zealot-icon.png')}"]
    link[rel="apple-touch-icon" sizes="120x120" href="#{asset_path('zealot-icon@2x.png')}"]
    link[rel="apple-touch-icon" sizes="180x180" href="#{asset_path('zealot-icon@3x.png')}"]
    link[rel="icon" type="image/x-icon" href="#{asset_path('zealot-icon@3x.png')}"]
    == favicon_link_tag 'zealot-icon.png'
    == favicon_link_tag 'zealot-icon-dark.png', media: "(prefers-color-scheme: dark)"
    == stylesheet_link_tag 'application', 'data-turbolinks-track': 'reload'
    == javascript_include_tag 'application', 'data-turbolinks-track': 'reload', defer: true
    == yield :header_tags
    == action_cable_meta_tag
    == csrf_meta_tags

  body[
    class="hold-transition #{body_class}"
    data-controller="global"
    data-global-env-value="#{Rails.env}"
    data-global-root-url-value="#{root_url}"
    data-global-apperance-value="#{Setting.site_appearance}"
  ]
    .wrapper
      == render 'layouts/navigation'

      .content-wrapper
        == render 'layouts/content'

      == render 'layouts/footer'

    - if Setting.google_analytics_id.present?
      == render 'layouts/google_analytics'
